<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
    <meta name="author" content="程月">
    <title>改变图片透明度</title>
    <style>
     *{
              box-sizing: border-box;
          }
            main{
                width: 710px;
                height: 330px;
                margin: 0 auto;
                border: 1px  solid palevioletred;
            }
            ul{
                margin: 0;
                padding: 0;
                list-style: none;
                display: flex;
                justify-content: space-around;
                flex-wrap: wrap;
                margin-top: 20px;
            }
            li{
                width: 125px;
                height: 125px;
                background-color: #aaa;
                margin: 10px 0;
                text-align: center;
                opacity: 0.5;
            }
            li:hover{
                opacity: 1;
            }
    </style>
</head>
<body>
    <main>
        <ul>
            <li><img src="img/1.jpg" alt=""></li>
            <li><img src="img/2.jpg" alt=""></li>
            <li><img src="img/3.jpg" alt=""></li>
            <li><img src="img/4.jpg" alt=""></li>
            <li><img src="img/5.jpg" alt=""></li>
            <li><img src="img/6.jpg" alt=""></li>
            <li><img src="img/7.jpg" alt=""></li>
            <li><img src="img/8.jpg" alt=""></li>
            <li><img src="img/9.jpg" alt=""></li>
            <li><img src="img/10.jpg" alt=""></li>
        </ul>
    </main>
</body>
</html>